package com.googlecode.quillen.service;

import com.googlecode.quillen.domain.Snapshot;
import com.googlecode.quillen.domain.AttributeStorageException;
import com.googlecode.quillen.util.ResultConsumer;

import java.util.Date;
import java.text.ParseException;

/**
 * Created by IntelliJ IDEA.
 * User: greg
 * Date: Dec 22, 2008
 * Time: 12:31:42 PM
 */
public interface SnapshotService
{
    void createStorage() throws AttributeStorageException;

    void deleteStorage() throws AttributeStorageException;

    Snapshot get(String name) throws AttributeStorageException, ParseException;

    void put(Snapshot snapshot) throws AttributeStorageException;

    void delete(String name) throws AttributeStorageException;

    void list(ResultConsumer<Snapshot> consumer) throws AttributeStorageException, ParseException;

    void find(String prefix, ResultConsumer<Snapshot> consumer) throws AttributeStorageException, ParseException;

    void find(String prefix, Date maxDate, ResultConsumer<Snapshot> consumer) throws AttributeStorageException, ParseException;
}
